﻿using System;
using System.Collections.Generic;
using System.Web;
using OSGeo.MapGuide;

namespace NegevGas
{



    public class Utility
    {



        MgSiteConnection siteConnection;



        public void InitializeWebTier(HttpRequest Request)
        {

            string realPath =

                Request.ServerVariables["APPL_PHYSICAL_PATH"];

            String configPath = realPath + "../webconfig.ini";

            MapGuideApi.MgInitializeWebTier(configPath);

        }



        public void ConnectToServer(String sessionID)
        {

            MgUserInformation userInfo =

                new MgUserInformation(sessionID);

            siteConnection = new MgSiteConnection();

            siteConnection.Open(userInfo);

        }



        public MgSiteConnection GetSiteConnection()
        {

            return siteConnection;

        }


    }
}
